package com.tiheima.controller;

import com.tiheima.model.result.Result;
import com.tiheima.model.vo.report.GetEmpGenderDataVO;
import com.tiheima.model.vo.report.GetEmpJobDataVO;
import com.tiheima.model.vo.report.GetStudentCountOfClazzDataVO;
import com.tiheima.model.vo.report.GetStudentDegreeDataVO;
import com.tiheima.service.ReportService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/report")
public class ReportController {

    @Resource
    private ReportService reportService;

    @GetMapping("/empGenderData")
    public Result<List<GetEmpGenderDataVO>> getEmpGenderData(){
        List<GetEmpGenderDataVO> getEmpGenderDataVOS = reportService.getEmpGenderData();
        return Result.success(getEmpGenderDataVOS);
    }

    @GetMapping("/empJobData")
    public Result<GetEmpJobDataVO> getEmpJobData(){
        GetEmpJobDataVO getEmpJobDataVO = reportService.getEmpJobData();
        return Result.success(getEmpJobDataVO);
    }

    @GetMapping("/studentDegreeData")
    public Result<List<GetStudentDegreeDataVO>> getStudentDegreeData(){
        return Result.success(reportService.getStudentDegreeData());
    }

    //studentCountData
    @GetMapping("/studentCountData")
    public Result<GetStudentCountOfClazzDataVO> getStudentCountOfClazzData(){
        return Result.success(reportService.getStudentCountOfClazzData());
    }
}
